package com.zonski.jbots.engine;

/**
 * The device in which the game is running, provides things like the 
 * ability to play sounds and shake the screen
 */
public interface Device
{
    /**
     * Loops the sound with the specified name
     */
    public static final int LOOP = -1;

    /**
     * Stops the sound with the specified name playing (typically used with loop)
     */
    public static final int STOP = 0;

    /**
     * Makes the screen vibrate for the number of updates specified in 
     * duration
     */
    void vibrate(int duration);

    /**
     * Plays a sound with the specified identifier
     */
    void play(String sound, int times);

    /**
     * Stops all vibrations and sounds playing, useful at the end of the level
     */
    void stopAll();
}
